#!/usr/bin/env tclsh

#abs( x)        Absolute value of x. 
#acos( x)       Arc cosine of x, in the range 0 to p. 
#asin( x)       Arc sine of x, in the range -p/2 to p/2. 
#atan( x)       Arc tangent of x, in the range -p/2 to p/2. 
#atan2( x, y)   Arc tangent of x/ y, in the range -p/2 to p/2. 
#ceil( x)       Smallest integer not less than x. 
#cos( x)        Cosine of x ( x in radians). 
#cosh( x)       Hyperbolic cosine of x. 
#double( i)     Real value equal to integer i. 
#exp( x)        e raised to the power x. 
#floor( x)      Largest integer not greater than x. 
#fmod( x, y)    Floating-point remainder of x divided by y. 
#hypot( x, y)   Square root of ( x 2 + y 2 ). 
#int( x)        Integer value produced by truncating x. 
#log( x)        Natural logarithm of x. 
#log10( x)      Base 10 logarithm of x. 
#pow( x, y)     x raised to the power y. 
#round( x)      Integer value produced by rounding x. 
#sin( x)        Sine of x ( x in radians). 
#sinh( x)       Hyperbolic sine of x. 
#sqrt( x)       Square root of x. 
#tan( x)        Tangent of x ( x in radians). 
#tanh( x)       Hyperbolic tangent of x. 


### 三角函数
set x 2 
set y [expr 2*sin(1)]
puts "x=$x, y=$y"

### 不小于x的整数
set x 2.3 
set y [expr ceil($x)]
puts "x=$x, y=$y"  ; #3


### 不大于于x的整数最大整数
set x 2.3 
set y [expr floor($x)]
puts "x=$x, y=$y"
